<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Goldproduce
 *
 * @author Samuel
 */
defined('BASEPATH') or die('forbidden');

class Jifenqiang_Controller extends Controller {

	private $inc;
	
	function _init() {
		check_level(50, segment(0), segment(1), segment(2, 'index'));

		$this->inc = $this->config['inc'];

	}

	function index() {
        
        //print_r($row);	
		//新创建一个连接
		$t_db_arr = array
		(
		        'library' => 'database',
		        'type' => 'mysql',
		        'host' => '10.11.6.105',
		        'name' => 'ad_collect',
		        'user' => 'root',
		        'password' => 'ggq123456',
		        'pconnect' => false,
		        'debug' => true,
		        'prefix' => 'tt_',
		);
		$t_db = new Database($t_db_arr);

		$sql = "SELECT COUNT(*) AS num FROM $t_db_arr[name].ad_collect201408 where is_notifyed = 1";
		//$sql = "SELECT COUNT(*) AS num FROM $row[logname].accountlogin  where {$where} ";
		//echo " sql2:$sql ";
		$one = $t_db->one($sql);
		$total = $one['num'];
		
		$t_db->free_all();
        
		$this->view->assign('number',$total);
		$this->view->display("playerlog/jifenqiang/index");
	}

	

}

?>
